# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicFamilyInfo(models.Model):
    _name = 'basic_family_info'
    _description = '家庭信息表'

    house_num = fields.Char(string="户主编号")
    res_addr = fields.Char(string="居住地址")
    detail_addr = fields.Char(string="详细地址")
    washroom = fields.Selection([
        ('1', '卫生厕所'),
        ('2', '非卫生厕所')],
        string="厕所类别")
    fam_struct = fields.Char(string="家庭结构")
    roomTypeCode = fields.Selection([
        ('1', '租住公房'),
        ('2', '廉租住房'),
        ('3', '自建房')],
        string="住房类型")
    low_inc_cond = fields.Char(string="低保户")
    living_cond = fields.Char(string="居住状况")

    per_month_income = fields.Float(string='人均月收入')
    roomArea = fields.Float(string='住房面积')
    month_eatoil = fields.Float(string='月食用油')
    month_eatsalt = fields.Float(string='月食用盐')
    fuelType = fields.Selection([
        ('1', '固体燃料'),
        ('2', '液体燃料'),
        ('3', '气体燃料')],
        string="燃料类型")
    totalNumber = fields.Integer(string='家庭总人口')
    createDate = fields.Date(string="建档日期", default=fields.Date.today())
    createUser = fields.Char(string="建档人")
    createUnit = fields.Char(string="建档机构")

    division_id = fields.Integer(string='所属区划ID')
    org_id = fields.Integer(string='所属机构ID')
    update_time = fields.Date(string="更新时间", default=fields.Date.today())
    dissolver = fields.Char(string="解散人")
    dissol_time = fields.Date(string="解散时间", default=fields.Date.today())
    is_delete = fields.Selection([
        ('0', '否'),
        ('1', '是')],
        string="是否删除")
    mod_state = fields.Selection([
        ('0', '未修改不需上传'),
        ('1', '修改需要上传')],
        string="修改状态")
